import Vue from "vue";
import VueRouter from "vue-router";
import Login from "@/views/Login.vue";
import Index from "@/views/Index.vue";
import Doctor from "@/views/doctor/Doctor.vue";
import SignUp from "@/views/SignUp.vue";
import User from "@/views/user/User.vue";
import City from "@/views/city/City.vue";
import DrugCompany from "@/views/drugcompany/DrugCompany.vue";
import Drug from "@/views/drug/Drug.vue";
import Ech from "@/views/echarts/Ech.vue";
import Pie from "@/views/echarts/Pie.vue";
import Policy from "@/views/policy/Policy.vue";
import SaleLC from "@/views/salelocation/SaleLC.vue";
import Material from "@/views/material/Material.vue";
import DCPolicy from "@/views/drugcompanypolicy/DCPolicy.vue";
import ShowMap from "@/views/ShowMap.vue";
import Test from "@/views/Test.vue";

Vue.use(VueRouter)

const routes = [
    {path:'/',  redirect:'/Login'},
    {path:'/login', component:Login},
    {path:'/signup', component:SignUp},
    {path:'/index', component:Index,
        children:[
            {path:'doctor',component:Doctor},
            {path: 'user',component: User},
            {path: 'city',component: City},
            {path: 'drug',component: Drug},
            {path: 'drugcompany',component: DrugCompany},
            {path: 'Ech',component: Ech},
            {path: 'Pie',component: Pie},
            {path: 'policy',component: Policy},
            {path: 'salelocation',component: SaleLC},
            {path: 'material',component: Material},
            {path: 'drugcompanypolicy',component: DCPolicy},
            {path: 'map',component: ShowMap},
            {path: 'text',component: Test},
        ]
    },
]

const router = new VueRouter({routes})
export default router
